/**
 * @author: 團長
 * @date: 2014-3-17-下午1:31:00
 */
package net.loyintean.pearlshell.basedb;

import net.loyintean.pearlshell.base.model.ResultData;
import net.loyintean.pearlshell.basedb.dto.BaseDto;
import net.loyintean.pearlshell.basedb.exception.TransactionException;

/** special interface for edit data in data base.
 * <p>
 * Loy add method of {@link #editSingleDto(BaseDto)}, and deprecated
 * {@link #editSingleDto(BaseDto)}. v2014-8-1.1.1.0
 * 
 * @author 團長
 * @since 2014-8-1
 * @version 1.1.0 */
public interface EditDBService<T> {

	/** edit data in database according to the input parameter.
	 * <p>
	 * and return a result with data and status.<br>
	 * the data means how many rows be updated by this method.<br>
	 * this method is used to instead {@link #editSingleDto(BaseDto)}.
	 * 
	 * @param dto
	 *            the data in dto is used for where clause.
	 * @return row numbers be edited by this operation .
	 * @throws TransactionException
	 *             this exceptin should lead to a transaction callback. */
	public ResultData<Integer> editSingleDto(T dto) throws TransactionException;
}
